<?php
	require_once('../includes/user.php');
	$user=new User();
	$pro_row=$user->getUserProfile($_POST['id']);
	$role=$user->getRole($pro_row['role']);
 ?>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="39%" align="right" valign="middle" class="head">Role :</td>
    <td width="1%">&nbsp;</td>
    <td colspan="2" align="left" valign="middle" class="profile"><?php echo $role; ?></td>
  </tr>
  <tr>
    <td colspan="4" align="right" valign="middle" class="head">&nbsp;</td>
  </tr>
  <tr>
    <td align="right" valign="middle" class="head"> Name :</td>
    <td>&nbsp;</td>
    <td colspan="2" align="left" valign="middle" class="profile"><?php echo $pro_row['name']; ?></td>
  </tr>
  <tr>
    <td colspan="4" align="right" valign="middle" class="head">&nbsp;</td>
  </tr>
  <tr>
    <td align="right" valign="middle" class="head"><?php if($pro_row['role']==2){ echo 'Desg'; }else { echo 'Reg No';}?> :</td>
    <td>&nbsp;</td>
    <td colspan="2" align="left" valign="middle" class="profile"><?php if($pro_row['role']==2){ echo $pro_row['desg']; }else { echo $pro_row['regno'];}?></td>
  </tr>
  <tr>
    <td colspan="4" align="right" valign="middle" class="head">&nbsp;</td>
  </tr>
  <?php if($pro_row['role']==1){ ?>
  <tr>
    <td align="right" valign="middle" class="head">Year :</td>
    <td>&nbsp;</td>
    <td colspan="2" align="left" valign="middle" class="profile"><?php 
	echo $user->getYear($pro_row['year']);
	?></td>
  </tr>
  <tr>
    <td colspan="4" align="right" valign="middle" class="head">&nbsp;</td>
  </tr>
  <tr>
    <td align="right" valign="middle" class="head">House :</td>
    <td>&nbsp;</td>
    <td colspan="2" align="left" valign="middle" class="profile"><?php 
	echo $user->getHouse($pro_row['house']);?></td>
  </tr>
  <tr>
    <td colspan="4" align="right" valign="middle" class="head">&nbsp;</td>
  </tr>
  <?php }?>
  <tr>
    <td align="right" valign="middle" class="head">Commitee :</td>
    <td>&nbsp;</td>
    <td colspan="2" align="left" valign="middle" class="profile"><?php 
	echo $user->getCommitee($pro_row['commitee']); ?></td>
  </tr>
  <tr>
    <td colspan="4" align="right" valign="middle" class="head">&nbsp;</td>
  </tr>
  <tr>
    <td align="right" valign="middle" class="head"><input type="hidden" value="<?php echo $pro_row['id']; ?>" name="pro_id" id="pro_id" />
    <input type="image" src="img/buttons/back.gif"   onclick="viewProfileRequest()" /></td>
    <td align="center" valign="middle" class="head">&nbsp;</td>
    <td width="11%" align="left" valign="middle" class="head"><input type="image" src="img/buttons/accept.gif" onclick="updateDetailedView(3)" /></td>
    <td width="49%" align="left" valign="middle" class="head"><input type="image" src="img/buttons/reject.gif" onclick="updateDetailedView(4)" /></td>
  </tr>
</table>
